package org.liukai.ems.service;

import org.liukai.ems.dao.EmpDao;
import org.liukai.ems.entity.po.Emp;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @create EmpService.java 10:54
 * 
 * @author liukai
 * @date 2015/12/11
 */
@Service
public class EmpService {
    @Resource
    private EmpDao empDao;

    public List<Emp> queryEmpList() {
        return empDao.queryEmpList();
    }

    public Emp queryEmpByEmpId(String empId){
        return empDao.queryEmpByEmpId(empId);
    }

    public void addEmp(Emp emp) {
        empDao.addEmp(emp);
    }

    public void deleteEmp(String empId){
        empDao.deleteEmp(empId);
    }

    public void updateEmp(Emp emp) {
        empDao.updateEmp(emp);
    }

    public EmpService(){
        System.out.println("实例化service");
    }


}
